package com.yhn.registration.remote;

import com.hospital.common.base.Result;
import com.hospital.common.config.FeignConfig;
import com.hospital.common.dto.payment.module.OrderCreateDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "payment-module",configuration = FeignConfig.class, contextId = "paymentFeignClient", path = "/payment", fallback = PaymentFeignFallback.class)
public interface PaymentFeignClient {

    @PostMapping("/create")
    Result<?> create(@RequestBody OrderCreateDto orderCreateDto);

    /**
     * 取消挂号（支付模块）
     */
    @GetMapping("/cancelRegistration")
    Result<?> cancelRegistration(@RequestParam("patientId") Long patientId,
                                 @RequestParam("registrationId") Long registrationId);
}


